/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2023.
 * Description: irq: merge high-precision timer can reduce interrupts and context switches
 * Author: langfei
 * Create: 2023-12-15
 */

#ifndef _CPU_HIGH_PRECISION_H_
#define _CPU_HIGH_PRECISION_H_

#ifdef CONFIG_EULEROS_MERGE_TIMER_IRQ
DECLARE_PER_CPU(int, period_divisor);

#if defined(CONFIG_X86_64)
extern void change_to_deadline(void *arg);
#endif

extern void period_divisor_deal(unsigned int cpu);
#else
static inline void period_divisor_deal(unsigned int cpu) {}
#endif /* CONFIG_EULEROS_MERGE_TIMER_IRQ */

#endif /* _CPU_HIGH_PRECISION_H_ */
